oxenstored: trim history in the frequent_ops function
authorThomas Sanders <thomas.sanders@citrix.com>
Tue, 28 Mar 2017 17:57:52 +0000 (18:57 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Apr 2017 14:10:42 +0000 (15:10 +0100)
commite1c62cdf782085605ea1186912fc419dd9464027
treef0480e6d0c93230d9fcd2facc70b825710540c4c
parent336afa82ca86fe61f9c46f89ae6726ff94754f34
oxenstored: trim history in the frequent_ops function

We were trimming the history of commits only at the end of each
transaction (regardless of how it ended).

Therefore if non-transactional writes were being made but no
transactions were being ended, the history would grow
indefinitely. Now we trim the history at regular intervals.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
tools/ocaml/xenstored/history.ml
tools/ocaml/xenstored/transaction.ml
tools/ocaml/xenstored/xenstored.ml